package com.BlackMesa.controllers;

import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Test;

import com.BlackMesa.models.Category;
import com.BlackMesa.models.Task;
import com.BlackMesa.models.User;
import android.app.Dialog;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;

@SuppressWarnings("unused")
public class LoginTest extends
		ActivityInstrumentationTestCase2<TodoListActivity> {
	private TodoListActivity mActivity;
	private ListViewController lvc;
	private User u;
	private Category cat1,cat2;
	
	public LoginTest(){
		super("com.BlackMesa.controllers",TodoListActivity.class);
	}
	
	public void setUp() throws Exception{
		super.setUp();
		u = new User("patrick","pat","p@this.com","p");
	}

	/*Patrick*/
	@Test
	public void test() {
		cat1 = new Category("cat1",0);
		cat2 = new Category("cat2",0);
		Task t = new Task(null, null, cat1, null, null, null);
		u.addTask(cat1, t);
		assertTrue(u.containsCategory(cat1));
		assertFalse(u.containsCategory(cat2));
	}

}
